package com.neotech.neo4j;

import java.net.URI;

import com.neotech.neo4j.resources.Item;
import com.neotech.neo4j.resources.ItemType;

/**
 * @author Slobodan
 * 
 * Neo4j database interface 
 */
public interface Neo4jDatabase {
	
	/**
	 * Create new node with node name and node value.
	 * Each node has a name and a value, which are set on a creation
	 * @return id of created node
	 */

	Long createNode();
	Long createNode(String name);
	Long createNode(String name, String value);
	
	void deleteItem(Long id, ItemType type);
	
	
	/**
	 * Adding property to node
	 */
	void addPropertyToNode(Long id, String propertyName, String propertyValue);
	void addPropertyToRelationship(Long id, String propertyName, String propertyValue);
	
	/**
	 * Adding relationship between two nodes
	 */
	Long addRelationship(Long nodeFrom, Long nodeTo, String relName);


	/**
	 * @return Item with ID and properties
	 */
	Item getItemById(Long id, ItemType type);
	Long getRootNode();	
	
	/**
	 * Returns value of a property in a node
	 */
	String getPropertyValue(Long id, String propertyName, ItemType type);

}
